package dao.impl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import dao.DaibanliebiaoDao;
import entity.Daibanliebiao;
import entity.Peixunjihua;
import entity.Renshidengji;
import entity.Xinchoubiaozhun;
import entity.Zhiweibiao;

public class DaibanliebiaoDaoImpl extends HibernateDaoSupport implements
		DaibanliebiaoDao {

	public List<Renshidengji> findByRenshidengjiShenHe() {
		return super.getHibernateTemplate().find("from Renshidengji where shenhestatus=1");
	}

	public List<Renshidengji> findByRenshidengjiBianGeng() {
		return super.getHibernateTemplate().find("from Renshidengji where shenhestatus=3");
	}

	public List<Zhiweibiao> findByZhiweibiaoStatus() {
		return super.getHibernateTemplate().find("from Zhiweibiao where status=1");
	}

	public List<Peixunjihua> findByPeixunjihuaStatus() {
		return super.getHibernateTemplate().find("from Peixunjihua where status=1");
	}

	public List<Xinchoubiaozhun> findByXinchoubiaozhunShenHe() {
		return super.getHibernateTemplate().find("from Xinchoubiaozhun where status=1");
	}

	public List<Xinchoubiaozhun> findByXinchoubiaozhunBianGeng() {
		return super.getHibernateTemplate().find("from Xinchoubiaozhun where status=4");
	}

	public Renshidengji findByRenshidengjiId(int id) {
		return (Renshidengji) super.getHibernateTemplate().find("from Renshidengji where id=?",id);
	}

	public Zhiweibiao findByZhiweibiaoId(int id) {
		return (Zhiweibiao) super.getHibernateTemplate().find("from Zhiweibiao where id=?",id);
	}

	public Peixunjihua findByPeixunjihuaId(int id) {
		return (Peixunjihua) super.getHibernateTemplate().find("from Peixunjihua where id=?",id);
	}

	public Xinchoubiaozhun findByXinchoubiaozhunId(int id) {
		return (Xinchoubiaozhun) super.getHibernateTemplate().find("from Xinchoubiaozhun where id=?",id);
	}

	public List<Renshidengji> findByRenshiId(Long id) {
		return super.getHibernateTemplate().find("from Renshidengji where id=?",id);
	}

	public List<Daibanliebiao> findAllDaibanliebiao() {
		return super.getHibernateTemplate().find("from Daibanliebiao");
	}
	





	
}
